/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.line.pipe.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.line.constant.enums.ParkLineModDictEnum;
import com.hopes.bizz.line.constant.enums.ParkLineSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 阀门
 *
 * @author pig
 * @date 2024-02-21 21:47:26
 */
@Data
@TableName(value = "line_valve", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "阀门")
public class LineValveEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* id
	*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description="id")
    private Long id;

	/**
	* 阀门编码
	*/
    @Schema(description="阀门编码")
    private String valveCode;

	/**
	* 阀门名称
	*/
    @Schema(description="阀门名称")
    private String valveName;

	/**
	* 直径
	*/
    @Schema(description="直径")
    private BigDecimal radius;

	/**
	* 公称压力
	*/
    @Schema(description="公称压力")
    private BigDecimal nominalPressure;

	/**
	* 使用介质
	*/
    @Schema(description="使用介质")
    private String workingMedium;

	/**
	* 阀门功能
	*/
    @Schema(description="阀门功能")
    private String effect;

	/**
	* 是否使用
	*/
    @Schema(description="是否使用")
    private String isUse;

	/**
	* 管段ID
	*/
    @Schema(description="管段ID")
    private Long pipeId;


    @Schema(description="坐标")
    private String location;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

    public String getIsUseStr() {
    	return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getIsUse());
	}

	public String getPipeIdStr() {
		return DictResolver.getItemLabelByValue(ParkLineModDictEnum.line_pipe, this.getPipeId());
	}

    public String getEffectStr() {
    	return DictResolver.getItemLabelByValue(ParkLineSysDictEnum.line_valve_effect, this.getEffect());
	}


}
